<?php
$cid        = gpc_getStringArray('cid');
$name       = "";

if(count($cid)==0)
{
    $cid[0]=$id;
}
$sql_select = "select cName,cUrlString,iId from tblnewsletter where iStatus=1 order by iId desc limit 1";
$result = $dbsql->query_fetch($sql_select);
    
if($result==false)
{
    page_transfer("not exists newsletter enable",$pagetr);
    exit();    
}

IncludeFunction('newsletter');    
SendNewsletter($result['iId'],$cid);

page_transfer("Send newsletter success",$pagetr);
exit();
?>